package com.itheima.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.domain.Book;

import java.util.List;

/*业务层接口*/
public interface BookService extends IService<Book> {

    /*保存*/
    boolean save(Book book);

    /*更新*/
    boolean update(Book book);

    /*删除*/
    boolean delete(Integer id);

    /*根据id查询*/
    Book getById(Integer id);

    /*查询全部*/
    List<Book> getAll();

    IPage<Book> getPage(Integer currentPage,Integer pageSize);

    boolean modify(Book book);

    IPage<Book> getPage(int currentPage, int pageSize, Book book);
}
